package com.huike.service.impl;

import com.huike.entity.HistoryEvent;
import com.huike.mapper.HistoryEventMapper;
import com.huike.service.IHistoryEventService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Lwen
 * @since 2019-11-12
 */
@Service
public class HistoryEventServiceImpl extends ServiceImpl<HistoryEventMapper, HistoryEvent> implements IHistoryEventService {
	@Override
    public IPage<HistoryEvent> listHistoryEventByPage(int page, int limit) {
        Map<String, HistoryEvent> map=new HashMap<String, HistoryEvent>();
        QueryWrapper<HistoryEvent> wrapper = new QueryWrapper<>();
        Page<HistoryEvent> pages = new Page<>(page,limit);
	    IPage iPage = baseMapper.selectPage(pages,wrapper);
        return iPage;
    }
}
